The settings a project's own file carries beyond its rooms and objects, and which of them change what your GBML code checks against.
A project's own file carries several kinds of settings side by side: some genuinely change what the checker allows and what the compiler generates, and some only ever affect the built ROM without your GBML source needing to know or care. Knowing which is which saves a trip to the wrong page when something does not check the way you expected.
string defaults to 32 characters; a project sets its own project-wide default, and any one variable can override it with its own /// @capacity doc tag. The checker can catch one narrow case at build time: a plain text literal put into a variable that has an explicit /// @capacity tag and is too long for it (name = "a very long line";), or the same kind of literal added onto such a variable with +. It reports that where you wrote it. It does not check anything else. A variable with no tag is not measured against the project-wide default, so a 70-character literal in an untagged variable under a 64 limit is accepted, and a template string ($"SCORE {score}") is never checked at all. Text that only gets its length at run time cannot be checked before the game runs. When it is joined with + or +=, or by a string function, it is cut off at the bound without any message. A template string is cut off the same way when it comes out too long. The project-wide default is also the size of the buffer every template string is built in, so a template string can never hold more than that.save_set's own key-value store. SRAM is the small battery-backed memory on a GBA cartridge that keeps a save when the power goes off, and it holds 32 KB in total, so the editor refuses a Save size bigger than that. That is the only thing it does today. The number does not resize the store: the store in the game is always the same size, whatever you type here. It holds at most 80 different keys, each name up to 15 characters (longer names are cut short), and takes up 2 KB of SRAM. When all 80 spots are used, saving a new key does nothing at all - no error, no message, and the value is simply not stored - while a key that already exists can still be updated. So keep your saved values under 80 keys (pack several into one key if you have to), and check a new key really saved with save_has while you are testing.The engine keeps a few tables of a fixed size. Each one takes memory whether or not your game uses it, and each one is a limit: the 17th animated tile group, the 65th thing drawn at once. Many of them are not the console's own limits, just sizes the engine chose, so a game may change them. Under Engine limits in Project Settings there is one box for each, under five headings: Tiles and rooms, Drawing and text, Effects, Cutscenes, and Motion and input. Leave a box empty and you get the default, which is the number every game used before these boxes existed - a game that touches none of them is built exactly as it was.
| Box | Default | You can pick | What it limits | If it is too small |
|---|---|---|---|---|
| Animated tile groups per room | 32 | 1 to 64 | the animated tiles one room runs at once, every tileset it uses together; other rooms have their own count (see Tile animation) | the build stops and names the room, says how many it has and how many are allowed |
| Tilesets paused at once | 8 | 1 to 32 | how many tilesets tile_anim_pause can hold still together | one more is not paused |
| Largest room whose tiles can change | 4096 | 1024 to 4096 | the biggest room, counted in 8 by 8 tiles, whose tiles your code can change while the game runs (tile_set_class, tile_set_index) and that can have collision layers; 4096 is 64 by 64 tiles, 512 by 512 pixels | the build stops for a bigger room with collision layers; in a bigger room that is not painted with tiles those two calls do nothing (a painted room over 64 by 64 tiles is a big room, whose changes are kept in their own table) |
| Things your code draws at once | 64 | 16 to 128 | how many different things your code draws (with draw_text, draw_sprite and the rest) the engine keeps ready at once, so that drawing the same thing every frame costs nothing extra | Build & Play stops with a message when your code draws one thing too many at once; in a finished game that thing is not drawn that frame |
| Fonts draw_text can use | 4 | 1 to 16 | how many different fonts your game draws text in | text in one more font draws nothing |
| Lights in a room | 8 | 1 to 32 | how many lights a dark room can have lit at once (each lit light also uses one of the 128 sprites the screen can show) | a light past the number stays dark |
| Tweens gliding at once | 16 | 1 to 64 | how many tweens can run at the same moment | a tween with no place jumps straight to its end value |
| Rooms the game remembers | 4 | 1 to 16 | how many rooms marked Persistent the game keeps after the player leaves them (see Persistent rooms) | the room left longest ago is forgotten, and is built new the next time the player goes there |
| Collision layers in a room | 8 | 8 to 32 | how many collision layers one room can have besides its starting layout | the build stops and names the room that has too many |
| Sprites in one drawn thing | 12 | 12 to 32 | how many sprites one thing your code draws can use; for text it is the longest line one draw_text call shows | letters past the number are cut off and not drawn |
| Effect particles alive at once | 24 | 4 to 64 | how many particles all your effects together can have at the same moment | particles past the number are not made, so a big burst comes out thinner |
| Effects running at once | 6 | 1 to 16 | how many effects started with effect_start can run together | an effect with no place to start does not appear |
| Shared turn-and-size settings | 8 | 1 to 32 | how many different turn-and-size settings particles can share once the console runs out of its own | a particle that cannot get one is only flipped, not turned |
| Turn-and-size slots effects may use | 8 | 1 to 32 | how many of the console's 32 turn-and-size slots your effects may use (your own turned and resized sprites share the same 32) | particles past the number share slots, and then are only flipped |
| Emitters in one effect | 3 | 1 to 8 | how many emitters (streams of particles) one effect can have | the build cuts the effect down to the number and says so |
| Text colors in cutscenes | 4 | 1 to 16 | how many different text colors your cutscenes can use all together | the build warns, and text in one more color shows no words |
| Effects one cutscene can start | 8 | 1 to 32 | how many effects one cutscene can start and still stop with a later step | the build warns, and an effect started past the number cannot be stopped by a later step |
| Backgrounds one cutscene can add | 8 | 1 to 32 | how many backgrounds one cutscene can create and still move or remove with a later step | the build warns, and a background created past the number cannot be moved or removed by a later step |
| Tiles a big room can change at once | 1024 | 256 to 4096 | how many tiles of a big room (over 512 pixels wide or tall) your code can change at the same time with tile_set_class, tile_set_flags, tile_set_shape and tile_set_index; a tile changed twice counts once | a change past the number is ignored (the tile stays as painted), and the Budgets tab and the debug view count what was ignored |
| Input actions | 32 | 1 to 64 | how many input actions your game can have | the build stops and names the first action that is one too many |
| Names the game can save | 80 | 16 to 400 | how many different names save_set can keep at once (see Saving); a saved game made with 80 is still read after you raise it | a name past the number is ignored, and the build warns when the names your code writes out come near it |
Each box shows what it costs. Every one of these is memory the game keeps for itself, and the page tells you how much one more costs and what your choices come to altogether, in the two kinds of working memory the console has. EWRAM is the 256 KB the whole game shares. IWRAM is the small, fast 32 KB that the console's quickest code and the program's own scratch space share, so a few bytes there matter more than a few bytes of EWRAM. The numbers were measured on a real game, not guessed: a tile group costs 2 bytes of IWRAM, a tween 36 bytes of EWRAM, a font 88, a thing your code draws 140, an effect particle 40, an input action 2 bytes of IWRAM, and every tile of Largest room whose tiles can change 3 bytes of EWRAM. Two limits cost no memory at all, and say so: Collision layers in a room and Turn-and-size slots effects may use. A third, Tiles a big room can change at once, costs memory only in a game that has a big room and changes its tiles: 12 bytes of EWRAM for each tile (12 KB at the default), shown on the Budgets tab. Where two boxes multiply (every drawn thing keeps room for its sprites, every running effect keeps a timer for each of its emitters) the page counts that too, so the total stays right when you change both. That last one is the big one, and every game pays it whether or not it ever changes a tile: a game whose rooms are all small can set it to 1024 and get 9,216 bytes of EWRAM back.
The page will not let you pick a number outside the range. The range is what the engine can really build: a number outside it would not compile, so the page says so in words and saves nothing. The build checks again, and so does the engine.
What the build does with your number. The build uses your number wherever it checks: the animated tile groups of each room are counted against it, a room with layers against Largest room whose tiles can change. The number goes into the game through a small file the build writes, gbml_project_format.h, so changing one does not make the next build start from scratch. It is saved in the project's own file under capacities.engineLimits, and only the boxes you filled in are written.
Why not every number. The rest of the engine's numbers stay as they are, on purpose. The language itself fixes some (12 alarms, 10 buttons, 16 user events: that is what GBML means). The console fixes others (sprites, backgrounds, palettes: see Budgets). The dialogue box in a cutscene has room for 40 letters because that is exactly what the widest font the editor allows needs: a smaller number would cut a line and a bigger one would buy nothing. A number goes on this list only when the build, the editor and the game all use the number you pick - the particle preview and the collision layers box follow it too - and a game can feel the difference.
A room's collision layers are switched by number: tile_layer_set_active(3). Under Collision layers in Project Settings there is one checkbox, Use layer names in my code. It is off until you tick it.
Tick it and every layer from 2 up gets a word equal to its number. The word is the room's name, _, then the layer's name, so layer 3 of west_room, called door_open, is west_room_door_open. This is a real change to what the checker accepts:
It is one setting for the whole game, not one per layer. Collision layers has all of it: how the word is made, why the room's name comes first, and what to do when you rename something. The words are checked at build time and become plain layer numbers, so they cost nothing while the game runs.
A project can name its own actions - fire, jump, menu_open - and say which buttons answer to each one, instead of naming a raw BTN_A everywhere in the code. You set them up under Input actions in Project Settings: a name, and any of the ten GBA buttons ticked beside it. A new project already has ten, one per button (left, right, up, down, action1, action2, l, r, start, select), so you can use them at once or rename them.
In code you write the action's name as a plain word, with no quotes:
if (action_pressed(jump)) { vsp = -4; }That is action_held, action_pressed and action_released. The name is checked before the game is built, so a typo is an error and not a button that never works.
Where the buttons live. The list in Project Settings is the starting point. Once the game is running, the engine keeps its own copy of it, and that copy is what every check reads. action_rebind changes the copy while the game runs - a controls screen would call it - and action_reset puts the starting buttons back. Neither one changes the project file, and a rebinding is forgotten when the game is turned off unless your own code saves it.
More than one button. An action can have several buttons, like a jump on both B and L. It counts as held when any of them is. action_rebind replaces all of them with the one button you name.
An action with no button. It is allowed. It exists and can be named, but it is never held, pressed or released, until action_rebind gives it a button. This is handy for something a player can choose to bind later.
A name that is not in Project Settings. That is an ordinary "not defined" error. Nothing is guessed.
Names your code cannot use. An action still exists if its name cannot be written as one plain word in code: two words, a word GBML already uses (default, speed), or the name of an object, script or asset of yours. The checker warns you, and the action just cannot be asked about by name. Rename it in Project Settings. A variable of your own with the same name as an action hides the action inside its own scope, exactly as it would hide any other name.
There is room for 32 actions, unless you change Input actions under Engine limits (1 to 64). A project with more, or with a button that is not one of the ten, is refused with a message that names the action.
Under Game speed in Project Settings there is one box with three choices: 60 frames a second, 30 frames a second and 20 frames a second. It starts on 60, so a game made before this box existed does not change at all.
Lower speeds give each frame more time, for big games on older consoles. A game with a lot going on can need more time to work out one frame than a single screen refresh gives it. At 30 your game works out one frame for every two screen refreshes, and at 20 one for every three, so each frame gets twice or three times as long.
What changes. Your game's frame is everything that happens once in a row: every Step event, alarms, movement, collisions and the drawing. At 60 it happens once for every screen refresh, as it always did. At 30 it happens on every second refresh, and at 20 on every third. The screen keeps refreshing at its normal speed, and music and sound keep their normal speed too: a song does not play slower at 30.
Everything you count in frames counts game frames. An alarm of 60 takes one second at 60, two seconds at 30 and three seconds at 20. Something that moves 2 pixels in every Step moves 2 pixels in every game frame, so it covers half as much ground in a second at 30. A sprite's frame_speed, the speed of a path, a tween, an effect, a cutscene's waits and game_frame() all count game frames in the same way. To keep a speed the same in real time after you lower the game speed, make each per-frame number twice as big at 30, or three times as big at 20.
Buttons are not lost. A quick tap that starts and ends between two game frames still counts as pressed on the next game frame, and as released on the same one.
What does not follow the game speed. The screen refresh and the sound. A picture made by the screen itself, such as a color gradient down the screen, is drawn on every refresh, but it only changes when your game's next frame changes it.
A lower speed makes motion look less smooth, so pick the highest one your game can keep up with. If your game uses the link cable, keep it at 60 until you have tried it. Changing the speed makes the next build start from scratch, so it takes a little longer.
Under Audio in Project Settings, Mixing quality sets how finely the console blends all your songs and sounds together while the game runs. There are eight choices, from 8 kHz (the lightest on the console, dull and muffled) through 10.5 kHz (lighter, high notes a little duller), 13 kHz, 16 kHz (the usual, and the starting choice), 18 kHz, 21 kHz and 27 kHz, up to 31 kHz (the clearest, and the most costly). Each choice has a short note under the box that says what it does for the sound and what it costs.
Blending the sound is work the console does in every frame, whatever is playing, and the higher the choice the more of each frame it takes. A busy game that runs out of time can pick a lower choice and give some of that time back; a quiet game with room to spare can pick a higher one for a clearer sound. Songs and sounds keep their own speed and pitch at every choice: only how clear they are changes.
This is not the same as the sample rate of one sound in the Music tab. That is how finely a single sound is stored, and it decides how much room the sound takes on the cartridge. Mixing quality is about the whole game's sound while it plays. Very high notes of a recorded sound turn harsh sooner at a lower mixing quality.
The box starts on 16 kHz, so a game made before it existed does not change at all. A console whose sound is made another way shows the box grayed out, with the reason. Changing it makes the next build start from scratch, so it takes a little longer.
Some consoles cannot turn, stretch or lean a sprite while the game runs. For those, the build draws the turned looks ahead of time and your game shows the closest one. On such a console Project Settings has a box called Sprite turning steps with the choices 4, 8, 16 and 32. It starts on 16.
The number is how many turned looks each sprite gets for one full turn. With 16, a look is drawn every 22.5 degrees. More looks make a turn smoother, but each look uses space, so fewer looks leave room for more pictures. If the build runs out of room it tells you which pictures lost some looks, and a lower number is one way to fix that.
A console that can turn sprites by itself does not show the box and ignores the setting. Your choice is kept in the project either way.
Some consoles can draw a piece of text in the middle of the screen in two ways: as sprites over the room, or as a strip across the screen. On such a console Project Settings has a box called Text in the middle of the screen. It starts on Auto.
A console that offers only some of these choices shows only those. A console that draws text one way does not show the box and ignores the setting. Your choice is kept in the project either way.
Text you draw at a place in the room (draw_text in a Draw event, not a Draw GUI event) does not follow this setting. On the Game Boy Color it is always drawn as sprites, and it scrolls along with the camera like anything else in the room. A few things to know:
Under Pausing in Project Settings there is one checkbox, Stop animations on pause. It is ticked for every project, so you do not have to do anything to get it.
When your game calls game_pause(true), almost everything that moves is yours to stop, and it does stop: Step, movement and the timers all freeze. Two things move on their own, without any code of yours, and this box decides what they do:
frame_speed holds the picture it is showing, and its Animation End event does not run.When the game carries on, both carry on from exactly where they stopped. Nothing starts again and nothing is lost.
Untick the box and both keep playing behind your pause menu, which is how a paused game behaved before the box existed. Then you stop a sprite yourself by setting its frame_speed to 0 when you pause, and a tileset by calling tile_anim_pause.
What the box does not touch. Music and sound, the camera, lights (a flickering light too), particles, screen effects and game_frame keep going through a pause whichever way the box is set, so wave keeps moving too. A room change and a cutscene also freeze your events, but they are not a pause, so sprites keep animating through them.
Your pause menu's own sprites stop as well, because every sprite stops. To make something in the menu move, draw it yourself with game_frame() or wave(), which never stop, or untick the box.
The box only does something in a game that calls game_pause. A game that never pauses is built exactly as it was before.
It is saved in the project's own file as build.stopAnimationsOnPause, and only when you untick it. Unlike the debug overlay below, flipping it does not make the next build start from scratch.
A built game can show a panel of live numbers: how many sprites, palettes and objects it is using right now, and how busy the console is. A player opens it with the debug chord, a button combination you choose (see The debug chord below). It is very useful while you make your game, and Budgets explains every number on it.
Under Debug overlay in Project Settings there is one checkbox, Ship the debug overlay in my ROM. It is ticked for every project, so nothing changes unless you untick it.
Untick it and the panel is left out of the game completely. It is not hidden, it is just not there: it takes no room in the game, and pressing the debug chord does nothing, because no code is listening for it. It does not change what a line of GBML checks against, only what ends up in the ROM.
A Release Build, the copy you give to players, leaves the panel out by itself, together with the names of your rooms and objects. If you want them in the finished game too, tick Keep the debug overlay in the finished game, just under the first box. It is saved as build.releaseDebugOverlay, only when you tick it. A Development Build & Play is not changed by it.
Flipping the box makes the next build start from scratch, so that it takes a little longer. This is on purpose. The build would otherwise keep pieces it already made with the panel in them.
This is a setting of one game, so it lives in Project Settings (File, then Project Settings), not in Preferences, which belongs to the editor and is the same for every project you open. It is saved in the project's own file as build.debugOverlay.
Under Debug chord in Project Settings there is a row of ten tick-boxes, one for each button on the console. The ticked buttons are the debug chord: they open the debug panel in a built game, and close it again. It starts as L, R and Select.
Tick at least three. With one or two, the panel would pop open by accident while someone is playing, so Gbabel will not save a chord that short. To swap in a new chord you pass through "fewer than three" on the way (untick the old buttons, then tick the new ones). That is fine: the page tells you when you are below three, and you can save once you reach it.
To use the chord, hold every ticked button except the right-most one in the row, then press that last one. With the default chord (L, R and Select) that means: hold L and R, then press Select. Under the boxes the page always spells out your own chord in words. Pressing the last button first does not count.
Left and Right (or Up and Down) cannot be pressed at the same time on a real Game Boy Advance, so a chord with both can only be used in an emulator. The page tells you when your chord has such a pair.
If you have unticked Ship the debug overlay in my ROM, the chord does nothing, because there is no panel to open. The page dims the boxes and says so, and keeps your choice for if you tick the overlay again.
Changing the chord makes the next build start from scratch too (see above), for the same reason. If the overlay is left out, changing the chord costs nothing, because it is not part of the game then. The chord is saved in the project's own file as debugChord, a list of button names.
Some cartridges have a small motor in them that shakes the console, like the one in a game controller. Under Cartridge in Project Settings there is one checkbox, Rumble cartridge. Tick it if your game is made for a cartridge that has such a motor. It is off until you tick it, and it is saved in the project's own file as build.rumble, only when you tick it.
What the box does depends on the console your game is made for:
rumble and rumble_stop shake a cartridge that has a motor. Without it, those two calls do nothing at all.rumble works whether the box is ticked or not, because the Advance has no separate switch for it. A cartridge with no motor just ignores the call.Asking for a rumble is always safe: a cartridge without a motor ignores it, and nothing breaks.
Pruning (whether the build keeps only the rooms/objects/assets a project's own room order can actually reach, or keeps everything regardless) lives in the same project file, but it does not change what a line of GBML checks against - pruning only decides what ships in the ROM once everything has already compiled and checked clean.